/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package data;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author stana
 */
@Entity
@Table(name = "USERINFOTABLE")
@NamedQueries(
{
    @NamedQuery(name = "Userinfotable.findAll", query = "SELECT u FROM Userinfotable u"),
    @NamedQuery(name = "Userinfotable.findByUserid", query = "SELECT u FROM Userinfotable u WHERE u.userid = :userid"),
    @NamedQuery(name = "Userinfotable.findByFirstname", query = "SELECT u FROM Userinfotable u WHERE u.firstname = :firstname"),
    @NamedQuery(name = "Userinfotable.findByLastname", query = "SELECT u FROM Userinfotable u WHERE u.lastname = :lastname"),
    @NamedQuery(name = "Userinfotable.findByEmail", query = "SELECT u FROM Userinfotable u WHERE u.email = :email"),
    @NamedQuery(name = "Userinfotable.findById", query = "SELECT u FROM Userinfotable u WHERE u.id = :id")
})
public class Userinfotable implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "USERID")
    private String userid;
    @Column(name = "FIRSTNAME")
    private String firstname;
    @Column(name = "LASTNAME")
    private String lastname;
    @Column(name = "EMAIL")
    private String email;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Column(name="PHONE_NUMBER")
    String phoneNumber;



    public Userinfotable()
    {
    }

    public Userinfotable(Integer id)
    {
        this.id = id;
    }

    public Userinfotable(Integer id, String userid)
    {
        this.id = id;
        this.userid = userid;
    }

    public String getPhoneNumber()
    {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber)
    {
        this.phoneNumber = phoneNumber;
    }



    public String getUserid()
    {
        return userid;
    }

    public void setUserid(String userid)
    {
        this.userid = userid;
    }

    public String getFirstname()
    {
        return firstname;
    }

    public void setFirstname(String firstname)
    {
        this.firstname = firstname;
    }

    public String getLastname()
    {
        return lastname;
    }

    public void setLastname(String lastname)
    {
        this.lastname = lastname;
    }

    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public Integer getId()
    {
        return id;
    }

    public void setId(Integer id)
    {
        this.id = id;
    }

    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object)
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Userinfotable))
        {
            return false;
        }
        Userinfotable other = (Userinfotable) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
        {
            return false;
        }
        return true;
    }

    @Override
    public String toString()
    {
        return "data.Userinfotable[id=" + id + "]";
    }

}
